﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Evoucher.Business.Models;

namespace Evoucher.WebApp.UserControls
{
    public partial class bankList : System.Web.UI.UserControl
    {
        
        protected void Page_Load(object sender, EventArgs e)
        {
            IVoucherRepository repo = new VoucherRepository();
            List<PaymentGateway> pay = repo.GetPaymentGateways();
            RPaymentGateway.DataSource = pay;
            RPaymentGateway.DataBind();
         }

        public string countRow(object id)
        {
            int i = Convert.ToInt32(id);

            if (i % 4 == 0 && i > 0)
            {
                return "</tr><tr>"; 
            }
            return null;
        }
    }
}